Fuzzy logic in data processing systems was developed to overcome problems which were difficult to solve with traditional control and decision making techniques because of the imprecise, vague, and incomplete nature of available information. Fuzzy logic combines the ideas of fuzzy sets and expert systems and uses them as tools to model and control complex processes, thereby providing a way of teaching a data processor to mimic the human intuition in control and decision making processes. Fuzzy sets allow the expression of any condition in terms of degrees of truth or membership which can vary from zero (false or no membership) to one (true or complete membership).
A fuzzy logic control engine consists of three major blocks: a fuzzification block, a rule evaluation block, and a defuzzification block. The fuzzification block takes several external inputs and compares each to a plurality of predefined membership functions (each membership function is a fuzzy set) to determine the degree of membership of each of the inputs in each membership function. Once the degrees of membership of the inputs have been determined, the rule evaluation block determines the appropriate response to the inputs according to a set of rules. Rules are constructed using IF, AND, and THEN statements. The AND operation performs a MIN function in which a minimum value is selected. A typical rule may appear as follows:
IF temperature is very hot AND heater output is average, THEN turn heater output to minimum.
Each rule in a fuzzy evaluation system is implemented in a consequent block in the rule evaluation block. When several rules are implemented, the outputs of the consequent blocks are logically summed in the rule evaluation block to combine the results of all the rules. The logical sum operation is a MAX function in which a maximum value of the plurality of consequent blocks is determined. The defuzzification block subsequently converts the output of the rule evaluation block into a format usable by the external system.
In general, implementations of a fuzzy logic inference engine vary widely in terms of inferendng speed, flexibility, and cost. Inference speed is a measure of how long the output of a fuzzy logic inference engine requires to change in response to changing inputs to the fuzzy logic inference engine. Flexibility is a measure of how well an inference engine can be configured to achieve optimal performance and cost. Some examples of fuzzy logic inference engines include the Omron FP-3000 digital fuzzy processor, the Aptronix FIDE software inference engines, and the VLSI fuzzy logic controller by Hiroyuki Watanabe, et. al.
The Omron FP-3000 digital fuzzy processor is a sixty four pin integrated circuit that can perform one complete fuzzy inference in 0.65 millisecond for 5 inputs, 2 outputs, and 20 rules at a 24 MHz operating frequency. In this implementation, inputs to the digital fuzzy processor are processed in parallel. For each input, rule evaluation is performed sequentially until all rules have been evaluated. Defuzzification is performed using either a center of gravity technique or a max-height technique. These techniques are well-known in the data processing art and will not be discussed in detail herein.
The VLSI fuzzy logic controller designed by Watanabe is an eighty four pin integrated circuit which can perform 580 inferences per millisecond for 102 rules operating at 36 MHz clock frequency. This fuzzy chip consists of a host interface, a fuzzifier, an inference engine, and a defuzzifier. A three stage pipeline is used to increase inference speed from input fuzzifier to defuzzifier. The host interface is used to download rules into memory at a starting time and then dynamically between inference operations. The fuzzifier consists of a large counter-addressed RAM (random access memory) which stores the values of membership functions. Each membership function uses 32 bytes (64 by 4 bits) of RAM. During operation, the inputs are sampled every 64 clock cycles and used as starting addresses containing membership values. Only one membership value is presented to the inference engine for rule evaluation at a time. MIN and MAX operations are performed once all membership values have been provided to the rule block. Defuzzification provides a result of the rule evaluation operation to an external system.
Software implementations of fuzzy logic inference engines such as the Aptronix's FIDE package compile rules and membership functions for use in various general purpose microcontrollers. In the FIDE implementation, the type of microcontroller chosen will determine the number of rules, the shapes and resolution of membership functions, and the number of inputs and outputs. Since all inference operations are done sequentially, inference time will increase when rules or membership functions are added. For a typical 8-bit microcontroller, calculating the membership value of one fuzzy input for one membership function takes eighty-eight CPU (central processing unit) timing cycles. At a 4 MHz bus speed, fuzzification time for a two input system with seven membership functions per input requires over 300 microseconds to execute each rule.
Perhaps the biggest drawback of the prior art systems described above is the inference speed. The purely software implementation of the fuzzy logic inference engine performs most slowly since it does not exploit any parallel processing features which normally exist in fuzzy logic inference engines. The two hardware implementations of fuzzy logic inference engines by Omron and Watanabe do take advantage of parallel processing to some extent. The architecture of both the Omron and Watanabe implementations require circuits which are shared among the input fuzzification and the rule evaluation blocks. Therefore, all signal paths which go through the common circuitry must be serialized and will, therefore, take more time to perform a fuzzy inference operation. Watanabe partially overcame this throughput problem through the use of pipelining. Inference speed for all three systems is dependent on the number of inputs, the number of rules, and the number of membership functions. As the system increases in size and complexity, the inference time slows down.